package com.yiren.dbaa.module.practice_set.carmodel.enums;

/**
 * Describe 天线摆放位置枚举
 *
 * @author WRX
 * @date 2022/12/5
 */
public enum AntennaLocationEnum {

    CAR_TOP_FRONT_BACK("车顶前、后摆放", 0),

    CAR_TOP_LEFT_RIGHT("车顶左、右摆放", 1),

    CAR_IN_FRONT_BACK("车内前、后摆放", 2),

    CAR_IN_LEFT_RIGHT("车内左、右摆放", 3),

    ;

    private String description;

    private int code;

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    AntennaLocationEnum(String description, int code) {
        this.description = description;
        this.code = code;
    }

    public static String getValue(int  code) {
        for (AntennaLocationEnum value : AntennaLocationEnum.values()) {
            if (value.getCode() == code) {
                return value.getDescription();
            }
        }
        return "";
    }
}
